﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.IO;
using System.Diagnostics;
namespace ehost
{
    class FileUtils
    {
        public static void deleteFile(String FPath,bool isDeleteDir)
        {
            DirectoryInfo Dir = new DirectoryInfo(FPath);
            FileInfo[] files= Dir.GetFiles();
            foreach (FileInfo file in files)
            {
                if (file.IsReadOnly)
                {
                    file.Attributes = FileAttributes.Normal;
                    file.Delete();
                }
                else file.Delete();   
            }
   
        }


    }
}
